package org.mmy.mmybackend.util;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.ToString;

@Data
@AllArgsConstructor
@NoArgsConstructor
@ToString
public class Result {
    private Object data;
    private String message;
    private int code;

    public static Result SUCCESS(Object data, String message){
        return new Result(data,message,200);
    }

    public static Result FAIL(String message, int code){
        return new Result(null,message,code);
    }

}
